package cn.huiyunche.base.service.enums;

/**
 * Created by LYN on 6/15/16.
 */
public enum TruckAttributeEnum {

    TRUCK_LENGHT("TRUCK_LENGHT", "车长(含车头)"),
    TRUCK_WIDTH("TRUCK_WIDTH", "车宽"),
    TRUCK_HEIGHT("TRUCK_HEIGHT", "车高(装车后)"),
    TRUCK_TYPE("TRUCK_TYPE", "车辆种类"),
    TRUCK_AXLE("TRUCK_AXLE", "轴数"),
    TRUCK_TRAILER("TRUCK_TRAILER", "挂车类型"),
    TRUCK_BOX("TRUCK_BOX", "箱体结构"),
    TRUCK_BIN("TRUCK_BIN", "仓位数");

    private final String value;
    private final String text;

    TruckAttributeEnum(String value, String text) {
        this.value = value;
        this.text = text;
    }

    public String getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static TruckAttributeEnum getByValue(String value) {
        for (TruckAttributeEnum temp : TruckAttributeEnum.values()) {
            if (temp.getValue().equals(value)) {
                return temp;
            }
        }
        return null;
    }
}
